#include <stdio.h>
#include <stdlib.h>

int main(int argc,char** argv)
{
  FILE* file;
  file = fopen("./1.txt","r");
  if(file == NULL)
  {
    fprintf(stderr,"fopen %s is fail\n","./1.txt");
    exit(-1);
  }
  
  FILE* file_2;
  file_2 = fopen("./2.txt","w+");
  char buf;
  while((fread(&buf,1,1,file)))
  {
    fwrite(&buf,1,1,file_2);
  }

  fclose(file_2);
  fclose(file);
  return 0;
}
